package com.springcloud.alibaba.controller;

import com.springcloud.configclient.commons.entities.CommonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;
@RestController
public class PaymentController {
    private static Map<Integer,String> map=new HashMap<>();
    static {
        map.put(1,"1111111111111111");
        map.put(2,"222222222222222");
        map.put(3,"333333333333333");
    }
    @GetMapping(value = "/payment/{id}")
    public CommonResult payment(@PathVariable("id") int id){

        return new CommonResult(222,"消息",map.get(id));
    }
}
